Read the full tutorial here:
>> Build a modern Android chat app with Kotlin
This example shows how to build an anonymous group chat with Kotlin:
await CometChat.init(process.env.COMETCHAT_APP_ID) | |
const user = await CometChat.login("bendewberry") | |
// Send message to "#General" group | |
const message = new CometChat.TextMessage( | |
"#General", | |
"Hello everyone", | |
CometChat.MESSAGE_TYPE.TEXT, | |
CometChat.RECEIVER_TYPE.GROUP) | |
await CometChat.sendMessage(message) |
class Chat extends Component { | |
constructor() { | |
this.state = { | |
messages: [] | |
} | |
} | |
async onComponentDidMount() { | |
await CometChat.init(process.env.appId) | |
this.user = await CometChat.login("bendewberry") |
Read the full tutorial here:
>> Build a modern Android chat app with Kotlin
This example shows how to build an anonymous group chat with Kotlin:
set -as terminal-overrides ",*-256color:Tc" | |
set -g prefix C-Space | |
set-window-option -g mode-keys vi | |
bind-key , command-prompt "rename-window '%%'" | |
set -g status-right '#H %a %d %H:%M #{prefix_highlight}' | |
set -g @plugin 'tmux-plugins/tpm' | |
set -g @plugin 'tmux-plugins/tmux-sensible' | |
set -g @plugin 'tmux-plugins/tmux-pain-control' | |
set -g @plugin 'tmux-plugins/tmux-yank' | |
set -g @plugin 'tmux-plugins/tmux-prefix-highlight' |
error_log logs/error.log; | |
events { | |
worker_connections 1024; | |
} | |
rtmp { | |
server { | |
listen 1935; | |
chunk_size 4000; |
// Install-Package jose-rt | |
using System; | |
using System.Text; | |
using System.Collections.Generic; | |
using Jose; | |
public class Program | |
{ | |
public static void Main() |
import React, { Component } from 'react' | |
import { ChatManager, TokenProvider } from '@pusher/chatkit' | |
import MessageList from './MessageList' | |
import SendMessageForm from './SendMessageForm' | |
+import OnlineList from './OnlineList' | |
class Chat extends React.Component { | |
state = { | |
currentUser: null, |
// ./src/OnlineList.js | |
import React, { Component } from 'react' | |
import { | |
ListView, | |
ListViewSection, | |
ListViewSectionHeader, | |
ListViewRow, | |
Text | |
} from 'react-desktop/macOs' |
// ./src/Chat.js | |
import React, { Component } from 'react' | |
import { ChatManager, TokenProvider } from '@pusher/chatkit' | |
import MessageList from './MessageList' | |
+import SendMessageForm from './SendMessageForm' | |
class Chat extends React.Component { | |
state = { | |
currentUser: null, |
// ./src/SendMessageForm.js | |
import React, { Component } from 'react' | |
import { Button, TextInput } from 'react-desktop/macOs' | |
class SendMessageForm extends Component { | |
state = { | |
text: '' | |
} |